# -*- coding: utf-8 -*-
from django.contrib.syndication.feeds import Feed
from models import Post,Comment

class blogrss(Feed):  
    title = "冠临-。-胖胖"  
    link = "/"  
    description = "冠临-。-胖胖" 
    title_template = 'feeds/post/title.html'
    description_template = 'feeds/post/description.html'
    
    def items(self):
        return Post.objects.order_by('-pubdate')
    
class commentrss(Feed):  
    title = "冠临-。-胖胖"  
    link = "/"  
    description = "冠临-。-胖胖"
    title_template = 'feeds/comment/title.html'
    description_template = 'feeds/comment/description.html'
    
    def items(self):
        return Comment.objects.order_by('-comment_time')



